package com.fmy.security.service.login.authenticator;

import com.fmy.security.service.login.CustAuthentication;
import org.springframework.security.core.userdetails.UserDetails;

/**
 * @author Mr.fmy
 * @version 1.0.0
 * @Description TODO 自定义身份验证接口
 * @createTime 2019/9/10 10:58
 */
public interface CustAuthenticator<T extends UserDetails> {

    /**
     * 集成认证
     */
    T authenticate(CustAuthentication authentication);

    /**
     * 预处理
     */
    void prepare(CustAuthentication authentication);

    /**
     * 判断是否支持集成认证类型
     */
    boolean support(CustAuthentication authentication);
}
